/**
 * @author chenjw
 * advertorialOrder模块接口列表
 */
import axios from '../http';
import base from './base'; // 导入接口域名列表
import qs from 'qs'; // 根据需求是否导入qs模块

const advertorialOrder = {  
	findByPage(params) {
		let parm =qs.stringify(params);
		return axios.get(`${base.bd}/order/findByPage?${parm}`);
	},
	
	findMediumByPage(params) {
		let parm =qs.stringify(params);
		return axios.get(`${base.bd}/order/findMediumByPage?${parm}`);
	},
	
	saveAdvertorialOrder(params) {
		return axios.post(`${base.bd}/order/saveAdvertorialOrder`, qs.stringify(params));
	},
	
	saveOfficialOrder(params) {
		return axios.post(`${base.bd}/order/saveOfficialOrder`, qs.stringify(params));
	},
	
	saveMediaOrder(params) {
		return axios.post(`${base.bd}/order/saveMediaOrder`, qs.stringify(params));
	},
	
	saveMicroblogOrder(params) {
		return axios.post(`${base.bd}/order/saveMicroblogOrder`, qs.stringify(params));
	},
	
	saveRedbookOrder(params) {
		return axios.post(`${base.bd}/order/saveRedbookOrder`, qs.stringify(params));
	},
	
	saveVideoOrder(params) {
		return axios.post(`${base.bd}/order/saveVideoOrder`, qs.stringify(params));
	},
	
	updateStatus(params) {
		return axios.post(`${base.bd}/order/updateStatus`, qs.stringify(params));
	},
	download(params){
		let parm =qs.stringify(params);
		return axios.get(`${base.bd}/download?${parm}`,{responseType: 'blob'});
	}
}

export default advertorialOrder;
